import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/login.vue'
import Admin from './views/admin.vue'
import Welcome from './views/admin/welcome'

Vue.use(Router);
export default new Router({
    mode: 'history',
    base: process.env.BABEL_URL,
    routes: [
        {
            path: '*',
            redirect: "/login",
        }, {
            path: '/login',
            component: Login
        },{
           path: '/admin',
            component: Admin,
            children: [{
               path: 'welcome',
               component: Welcome
            }]
        }
    ]

})
